import serial



#A basic set of commands for sending stuff over the serial port


#Change the port and baud as need be
#to use, in another file:


#import serialeasy
#serialeasy.connect()


#serialeasy.ardout("some message")




baud = 9600


port = "/dev/tty.usbserial-A700dY7a"

ser = serial.Serial(port,baud)


ser.timeout = 0.05



def ardout(string):


        ser.write(string+"\r\n")


        a = ser.readlines()


        s = ""
        for i in a:


                s += i
        print s










def connect():
        ser.open()



def disconnect():


        ser.close()
